package MaquinaVirtual;

import java.util.ArrayList;

public class Prog {
	
	private ArrayList<Instruccion> prog;
	private int cProg;
	
	public Prog(){
		cProg = 0;
	}
	
	public int getcProg(){
		return cProg;
	}
	
	public void setcProg(int c){
		this.cProg = c;
	}
	
	public Instruccion getInstruccion(){
		return prog.get(cProg);
	}
	
	public void setInstruccion(Instruccion instr){
		prog.add(instr);
	}
	
	public void ejecutar(){
		prog.get(cProg).ejecutarInstruccion();
	}
}
